

package com.feiyuan.admin.app.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.feiyuan.admin.app.entity.UserEntity;
import com.feiyuan.admin.app.form.LoginForm;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 用户
 *
 * @author Mark sunlightcs@gmail.com
 */
public interface UserService extends IService<UserEntity> {

	UserEntity queryByMobile(String mobile);

	/**
	 * 用户登录
	 * @param form    登录表单
	 * @return        返回用户ID
	 */
	long login(LoginForm form);

	/**
	 * 发送验证码
	 * @param mobile 手机号
	 * @return Boolean
	 */
	Boolean sendCode(String mobile);

	/**
	 * 退出登录
	 */
	Boolean logout(String mobile, HttpServletRequest request);

	com.feiyuan.common.entity.UserEntity queryById(Long userId);

    Map<String, Object> newLogin(LoginForm form);
}
